/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.unitunes.util;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class HibernateUtil {

    private static EntityManagerFactory entityManagerFactory;
        
    public static EntityManagerFactory getEntityManagerFactory() {
        if(entityManagerFactory == null) createEntityManagerFactory();
    	return entityManagerFactory;
    }
   
    private static void createEntityManagerFactory(){
    	entityManagerFactory = Persistence.createEntityManagerFactory("uniTunesSession");
    }
    
}
